import request from '@/utils/request'
import querystring from 'querystring'

/**
 * 分页查询项目
 * @param {*} form 
 * @param {*} pageSize 
 * @param {*} currentPage 
 */
export function dataList(form, pageSize, currentPage) {
  const data = {
    param: form,
    pageSize: pageSize,
    pageNo: currentPage
  }
  return request.post('/catProject/page',data)
}
/**
 * 新增项目
 * @param {*} options 
 */
export function addData(options) {
  return request.post('/catProject/save', options)
}

/**
 * 修改项目
 * @param {*} options 
 */
export function updateData(options) {
  return request.put('/catProject/save', options)
}

/**
 * 获取项目详情
 * @param {*} id 
 */
export function details(id) {
  return request.get(`/catProject/${id}`)
}

/**
 * 删除项目
 * @param {*} id 
 */
export function deleteData(id) {
  return request.delete(`/catProject/${id}`)
}

/**
 * 修改项目状态
 * @param {*} id 
 */
export function statusData(id) {
  return request.get(`/catProject/status/${id}`)
}

